import xjhRequest from './index'

/**
 * 获取视频首页的展示数据
 * @param {number} offset 从多少开始
 * @param {number} limit 一次多少
 */
export function getTopMV(offset, limit = 10) {
    return xjhRequest.get('/top/mv', {
        offset,
        limit
    })
}

/**
 * get the playback address of this mvid
 * @param {number} id mvid
 */
export function getMVUrl(id) {
    return xjhRequest.get('/mv/url', {
        id
    })
}
/**
 * details of request MV
 * @param {number} mvid mvid
 */
export function getMVDetail(mvid) {
    return xjhRequest.get('/mv/detail', { mvid })
}

/**
 * get all videos associated with this id
 * @param {number} id related id
 */
export function getRelatedVideo(id) {
    return xjhRequest.get('/related/allvideo', { id })
}